From e32a42254e085fb78421366ae95139411094f2f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Wed, 11 Jul 2018 22:57:59 +0200 Subject: [PATCH] babl.h: add documentation --- babl/babl-internal.h | 5 +++++ babl/babl.h | 21 +++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/babl/babl-internal.h b/babl/babl-internal.h index 392d786..ee920ed 100644 --- a/babl/babl-internal.h +++ b/babl/babl-internal.h @@ -455,6 +455,11 @@ void _babl_fish_prepare_bpp (Babl *babl); * the result is allocated with malloc and you should free it when done. */ +typedef enum { + BABL_ICC_DEFAULTS = 0, + BABL_ICC_COMPACT_TRC_LUT = 1, +} BablICCFlags; + char *babl_space_to_icc (const Babl *space, const char *description, const char *copyright, diff --git a/babl/babl.h b/babl/babl.h index c6052e7..660138f 100644 --- a/babl/babl.h +++ b/babl/babl.h @@ -494,13 +494,9 @@ const Babl * babl_trc_gamma (double gamma); */ const Babl * babl_trc (const char *name); -typedef enum { - BABL_ICC_DEFAULTS = 0, - BABL_ICC_COMPACT_TRC_LUT = 1, -} BablICCFlags; - -/* babl_space_get: +/** + * babl_space_get: * * query thechromaticities of white point and primaries as well as trcs * used for r g a nd b, all arguments mights be NULL. @@ -515,6 +511,19 @@ void babl_space_get (const Babl *space, const Babl **green_trc, const Babl **blue_trc); +/** + * babl_space_get_icc: + * + * Return pointer to ICC profile for space note that this is + * the ICC profile for R'G'B', though in formats only supporting linear + * like EXR GEGL chooses to load this lienar data as RGB and use the sRGB + * TRC. + * + * @babl: a BablSpace + * @length: point to an integer where length of profile in bytes is stored. + * + * Returns pointer to ICC profile data. + */ const char *babl_space_get_icc (const Babl *babl, int *length); #ifdef __cplusplus -- 2.30.2